/*
 *  Copyright 2010 Wesley Gooch, Ryan Nix, Cody Wenzel.
 *  Montana State University - Spring Semester 2010
 *  Computer Science 450 - Compilers
 *  Project: Micro-Pascal Compiler
 */

package msu.compiler.semantics;

import msu.compiler.codegenerators.LabelGen;
import java.util.ArrayList;
import msu.compiler.scanner.Token;

/**
 *
 * @author Wesley
 */
public abstract class AbstractMethodSymbol extends Symbol {

    protected byte returnType;
    protected ArrayList<ParameterSymbol> parameters = new ArrayList();

    public AbstractMethodSymbol(Token token, byte type, String kind) {
        super(token, type, kind, LabelGen.getLabelGen().getLabel());
    }

    public void setReturnType(byte returnType) {
        this.returnType = returnType;
    }

    public void addParameter(ParameterSymbol p) {
        parameters.add(p);
    }

    public ArrayList <ParameterSymbol> getParameters() {
        return parameters;
    }

    public int getSizeParameters() {
        return parameters.size();
    }
}
